<?php
    include('./library/conn.php');

    $phone = $_REQUEST['phone'];

    $sql="select * from users where phone = '$phone'";

    $result = $mysqli->query($sql);

    $mysqli->close();

    // die();
    if($result->num_rows>0){
        echo '{"msg":"用户名已存在","status":200,"has":true,"username":"'.$username.'"}';
    }else{
        echo '{"msg":"用户名可以使用","status":200,"has":false,"username":"'.$username.'"}';
    }
?>